<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>项目申报</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="Expires" CONTENT="0">
    <meta http-equiv="Cache-Control" content="no-siteapp,no-transform,no-store, no-cache, must-revalidate">
    <meta http-equiv="Pragma" content="no-cache">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/weadmin.css">
    <script type="text/javascript" src="/lib/layui/layui.js" charset="utf-8"></script>
    <link rel="stylesheet" href="/static/css/buildUnit/common.css">
    <style>
        body {
            height: auto;
        }

        .content {
            padding: 20px;
        }

        .layui-container {
            padding-top: 20px;
            width: auto;;
        }

        /*单元格备注样式*/
        .layui-table td.tdBz {
            text-align: left;
            padding-left: 0;
            border-left: none;
            color: #aaa;
        }

        .padNone .layui-form-select .layui-input {
            padding-right: 0;
        }

        .hide {
            display: none;
        }
    </style>
</head>
<body>
<div class="layui-container">
    <form id="form" class="layui-form layui-form-pane" action="" lay-filter="example">
        <div class="layui-collapse">
            <div class="layui-collapse">
                <!--报审内容-->
                <div class="layui-colla-item">
                    <h2 class="layui-colla-title">报审内容</h2>
                    <div class="layui-colla-content layui-show">
                        <table class="layui-table v-table">
                            <tbody>
                            <tr class="hide">
                                <td width="24%"></td>
                                <td width="13%"></td>
                                <td width="13%"></td>
                                <td width="24%"></td>
                                <td width="13%"></td>
                                <td width="13%"></td>
                            </tr>
                            <tr>
                                <td class="th8 required">报审内容</td>
                                <td colspan="5" id="submitExamInfo">
                                    <!--<input type="checkbox" name="submitExamInfo" lay-filter="submitExamInfo" title="勘察文件"
                                           value="1">
                                    <input type="checkbox" name="submitExamInfo" class="formData" lay-filter="submitExamInfo"
                                           title="施工图设计文件" checked value="2">
                                    <input type="checkbox" name="submitExamInfo" lay-filter="submitExamInfo" title="配套专项设计文件"
                                           value="3">-->
                                </td>
                            </tr>
                            <tr>
                                <td class="th8 required">是否已完成勘察报告审查</td>
                                <td colspan="5">
                                    <!--建设单位id-->
                                    <input type="hidden" name="buildCorpId" class="formData">
                                    <!--批转id-->
                                    <input type="hidden" name="decId" class="formData">
                                    <!--项目编号-->
                                    <input type="hidden" name="prjCode" class="formData">
                                    <!--项目id-->
                                    <input type="hidden" name="prjId" class="formData">
                                    <select name="kcReportFlag" id="kcReportFlag" lay-filter="kcReportFlag"
                                            class="formData" lay-verify="isEmpty">
                                        <option value="">请输入</option>
                                    </select>
                                </td>
                            </tr>
                            <tr class="relateKc hide">
                                <td class="th8 required">原勘察审查机构</td>
                                <td colspan="5">
                                    <input type="text" class="layui-input selectKcOrgBtn selectName" data-type="kancha"
                                           name="kcCheckOrgName" lay-verify="isEmpty" id="kcCheckOrgName" readonly
                                           placeholder="请选择"
                                    >
                                    <input type="hidden" class="layui-input selectId" name="kcCheckOrgId"
                                           id="kcCheckOrgId"
                                           readonly>
                                </td>
                            </tr>
                            <tr class="relateKc hide">
                                <td class="th8 required">勘察完成时间</td>
                                <td colspan="2">
                                    <input type="text" class="layui-input layui-disabled" name="kcReportFinishTime"
                                           id="kcReportFinishTime" disabled>
                                </td>
                                <td class="th8 required">勘察合格书编号</td>
                                <td colspan="2">
                                    <input type="text" class="layui-input layui-disabled" name="kcReportQualifyBookNum"
                                           id="kcReportQualifyBookNum" disabled>
                                </td>
                            </tr>
                            <tr>
                                <td class="th8 required">遴选情况</td>
                                <td colspan="5">
                                    <select name="selectInfo" id="selectInfo" lay-filter="selectInfo"
                                            lay-verify="isEmpty" class="formData">
                                        <option value="">请输入</option>
                                    </select>
                                </td>
                            </tr>
                            <tr class="disShentuOrgBox hide">
                                <td class="th8 required">免于遴选时关联项目和审查机构</td>
                                <td colspan="5">
                                    <input type="text" class="layui-input selectShenTuProjBtn selectName formData"
                                           data-type="kancha"
                                           name="checkOrgName" readonly
                                           placeholder="请选择">
                                    <input type="hidden" class="layui-input selectId formData" name="checkOrgId"
                                           readonly>

                                    <!-- <input class="layui-input selectProjBtn" type="text" data-type="shentu"
                                            placeholder="请选择" readonly>
                                     <input type="hidden" class="formData " name="relatePrjName">
                                     <input type="hidden" class="formData" name="checkOrgName">
                                     <input type="hidden" class="formData" name="checkOrgId">-->
                                </td>
                            </tr>
                            <tr class="oldShentuOrgBox hide">
                                <td class="th8 required">原审查机构</td>
                                <td colspan="5">
                                    <input type="text" class="layui-input selectBtn selectName formData"
                                           name="checkOrgName"
                                           readonly
                                           placeholder="请选择">
                                    <input type="hidden" name="checkOrgId" class="selectId formData" readonly>
                                </td>
                            </tr>
                            <tr class="oldShentuOrgBox hide">
                                <td class="th8 required">审查完成时间</td>
                                <td colspan="2">
                                    <input type="text" class="layui-input formData" name="checkFinishTime"
                                           id="checkFinishTime">
                                </td>
                                <td class="th8 required">审查合格书编号</td>
                                <td colspan="2">
                                    <input type="text" class="layui-input formData" name="checkHgsCode"
                                           id="checkHgsCode">
                                </td>
                            </tr>
                            <tr>
                                <td class="th8 required">联合备案内容</td>
                                <td colspan="5" id="unionRecordInfo">
                                    <!--<input type="checkbox" name="unionRecordInfo" lay-filter="unionRecordInfo"
                                           class="formData"
                                           title="是否含消防设计" value="1">
                                    <input type="checkbox" name="unionRecordInfo" lay-filter="unionRecordInfo"
                                           title="是否含人防设计"
                                           value="2">-->
                                </td>
                            </tr>
                            <tr>
                                <td class="th8 required">建设主管部门</td>
                                <td colspan="3">
                                    <select name="regulatorZjLevel" id="regulatorZjLevel" lay-verify="isEmpty"
                                            lay-filter="regulatorZjLevel"
                                            class="formData" click="zjMech">
                                        <option value="">请选择</option>
                                    </select>
                                </td>
                                <td colspan="2">
                                    <input type="text" class="layui-input selectName formData"
                                           name="regulatorZjDeptName"
                                           readonly
                                           id="regulatorZjDeptName" value="">
                                    <input type="hidden" class="selectId formData" name="regulatorZjDeptId"
                                           id="regulatorZjDeptId" value="">
                                </td>
                            </tr>
                            <tr class="renfangBox hide">
                                <td class="th8 required">人防主管部门</td>
                                <td colspan="3">
                                    <select name="regulatorRfLevel" id="regulatorRfLevel" lay-filter="regulatorRfLevel"
                                            lay-verify="isEmpty" lay-filter="regulatorRfLevel"
                                            class="formData" click="rfMech">
                                        <option value="">请选择</option>
                                    </select>
                                </td>
                                <td colspan="2">
                                    <input type="text" class="layui-input selectName formData"
                                           name="regulatorRfDeptName"
                                           readonly
                                           id="regulatorRfDeptName" value="">
                                    <input type="hidden" class="selectId formData" name="regulatorRfDeptId"
                                           id="regulatorRfDeptId" value="">
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <!--建设单位信息-->
            <div class="layui-collapse">
                <div class="layui-colla-item">
                    <h2 class="layui-colla-title">建设单位信息</h2>
                    <div class="layui-colla-content layui-show">
                        <table class="layui-table v-table">
                            <tbody>
                            <tr class="hide">
                                <td width="24%"></td>
                                <td width="13%"></td>
                                <td width="13%"></td>
                                <td width="24%"></td>
                                <td width="13%"></td>
                                <td width="13%"></td>
                            </tr>
                            <tr>
                                <td class="th8">建设单位名称</td>
                                <td colspan="2">
                                    <input name="buildCorpName" type="text" class="layui-input formData layui-disabled"
                                           disabled
                                           placeholder="建设单位名称">
                                </td>
                                <td class="th8">法定代表人</td>
                                <td colspan="2">
                                    <input name="buildComartiperson" type="text"
                                           class="layui-input formData  layui-disabled"
                                           disabled
                                           placeholder="法定代表人">
                                </td>
                            </tr>
                            <tr>
                                <td class="th8 required">建设单位项目负责人</td>
                                <td colspan="2">
                                    <input name="buildProjectLeaderId" type="text"
                                           class="layui-input formData layui-disabled"
                                           placeholder="项目负责人" disabled>
                                </td>
                                <td class="th8 required">联系电话</td>
                                <td colspan="2">
                                    <input name="buildCorpLinkPhone" type="text"
                                           class="layui-input formData layui-disabled"
                                           placeholder="联系电话" disabled>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <!--项目概况-->
            <div class="layui-collapse">
                <div class="layui-colla-item">
                    <h2 class="layui-colla-title">项目概况</h2>
                    <div class="layui-colla-content layui-show">
                        <table class="layui-table v-table">
                            <tbody>
                            <tr class="hide">
                                <td width="24%"></td>
                                <td width="13%"></td>
                                <td width="13%"></td>
                                <td width="24%"></td>
                                <td width="13%"></td>
                                <td width="13%"></td>
                            </tr>
                            <tr>
                                <td class="th8 required">工程项目名称</td>
                                <td colspan="5" id="devUnitName">
                                    <input name="prjName" type="text" class="layui-input formData layui-disabled"
                                           disabled placeholder="请输入工程项目名称">
                                </td>
                            </tr>
                            <tr>
                                <td class="th8 required">工程项目地址</td>
                                <td colspan="5">
                                    <div class="layui-input-inline">
                                        <select name="provinceNum" lay-filter="provinceNum layui-disabled" disabled
                                                class="formData">
                                            <option value="">请选择省</option>
                                        </select>
                                    </div>
                                    <div class="layui-input-inline">
                                        <select name="cityNum" lay-filter="cityNum layui-disabled" disabled
                                                class="formData">
                                            <option value="">请选择市</option>
                                        </select>
                                    </div>
                                    <div class="layui-input-inline">
                                        <select name="countyNum" lay-filter="countyNum layui-disabled" disabled
                                                class="formData">
                                            <option value="">请选择县/区</option>
                                        </select>
                                    </div>
                                    <div class="layui-input-inline">
                                        <input name="address" type="text" class="layui-input formData layui-disabled"
                                               disabled>
                                    </div>
                                </td>
                            </tr>

                            <tr>
                                <td class="th8 required">工程项目类别</td>
                                <td colspan="2">
                                    <select name="prjCategory" id="prjCategory" class="formData layui-disabled"
                                            disabled>
                                        <option value="">请选择</option>
                                    </select>
                                </td>
                                <td class="th8 required">工程性质</td>
                                <td colspan="2">
                                    <select name="prjQuality" id="prjQuality" class="formData layui-disabled" disabled>
                                        <option value="">请选择</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td class="th8 required">工程用途</td>
                                <td colspan="2">
                                    <select name="prjPurpose" id="prjPurpose" class="formData layui-disabled" disabled>
                                        <option value="">请选择</option>
                                    </select>
                                </td>
                                <td class="th8 required">项目建设规模</td>
                                <td colspan="2">
                                    <select name="prjScale" id="prjScale" class="formData layui-disabled" disabled>
                                        <option value="">请选择</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td class="th8 required">立项文号</td>
                                <td colspan="2">
                                    <input name="prjApprovalNum" type="text" class="layui-input formData layui-disabled"
                                           disabled placeholder="请输入立项文号"
                                    >
                                </td>
                                <td class="th8 required">立项来源</td>
                                <td colspan="2">
                                    <select name="prjApprovalSource" class="formData layui-disabled" disabled
                                            id="prjApprovalSource">
                                        <option value="">请选择</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td class="th8 required">项目批复机关</td>
                                <td colspan="2">
                                    <input name="prjApprovalDeptName" type="text"
                                           class="layui-input formData layui-disabled" disabled
                                           placeholder="请输入项目批复机关"
                                    >
                                </td>
                                <td class="th8 required">项目批复时间</td>
                                <td colspan="2">
                                    <input name="prjApprovalTime" type="text"
                                           class="layui-input formData layui-disabled" disabled
                                           placeholder="请输入项目批复时间"
                                    >
                                </td>
                            </tr>
                            <tr>
                                <td class="th8 required">计划开工时间</td>
                                <td colspan="2">
                                    <input name="planStartTime" type="text" class="layui-input formData layui-disabled"
                                           disabled placeholder="请输入计划开工时间">
                                </td>
                                <td class="th8 required">计划竣工时间</td>
                                <td colspan="2">
                                    <input name="planCompleteTime" type="text"
                                           class="layui-input formData layui-disabled" disabled placeholder="请输入计划竣工时间">
                                </td>
                            </tr>
                            <tr>
                                <td class="th8 required">总投资(万元)</td>
                                <td colspan="2">
                                    <input name="allInvest" type="text" lay-verify="isEmpty"
                                           class="layui-input formData"
                                           placeholder="总投资(万元)">
                                </td>
                                <td class="th8 required">本次送审投资额(万元)</td>
                                <td colspan="2">
                                    <input name="oneTimeInvest" type="text" lay-verify="isEmpty"
                                           class="layui-input formData"
                                           placeholder="本次送审投资额(万元)">
                                </td>
                            </tr>
                            <tr class="buildOrgItem kanchaTrBox hide">
                                <td class="th8 required">抗震设防专项论证</td>
                                <td colspan="2">
                                    <select name="antiSeismicFortificationProofFlag"
                                            id="antiSeismicFortificationProofFlag" class="formData">
                                        <option value=""></option>
                                    </select>
                                </td>
                                <td class="th8 required">设防烈度(度)</td>
                                <td colspan="2">
                                    <select name="fortificationIntensity"
                                            id="fortificationIntensity" class="formData">
                                        <option value=""></option>
                                    </select>
                                </td>
                            </tr>
                            <tr class="buildOrgItem kanchaTrBox hide">
                                <td class="th8 required">本次送审面积(㎡)</td>
                                <td colspan="2">
                                    <input name="allArea" type="text" class="layui-input formData"
                                           placeholder="本次送审面积(㎡)">
                                </td>
                                <td class="th8 required">地上面积(m²)</td>
                                <td colspan="2">
                                    <input name="landArea" type="text" class="layui-input formData"
                                           placeholder="地上面积(m²)">
                                </td>
                            </tr>
                            <tr class="buildOrgItem kanchaTrBox hide">
                                <td class="th8 required">地下面积(㎡)</td>
                                <td colspan="2">
                                    <input name="undergroundArea" type="text" class="layui-input formData"
                                           placeholder="地下面积(㎡)">
                                </td>
                                <td class="th8 required">工程勘察等级</td>
                                <td colspan="2">
                                    <select name="prjKcLevel" id="prjKcLevel" class="formData">
                                        <option value=""></option>
                                    </select>
                                </td>
                            </tr>
                            <tr class="buildOrgItem kanchaTrBox hide">
                                <td class="th8 required">含建筑节能设计</td>
                                <td colspan="2">
                                    <select name="buildingEnergyDesignFlag" id="buildingEnergyDesignFlag"
                                            class="formData">
                                        <option value=""></option>
                                    </select>
                                </td>
                                <td class="th8 required">超限高层</td>
                                <td colspan="2">
                                    <select name="overHignFlag" id="overHignFlag" class="formData">
                                        <option value=""></option>
                                    </select>
                                </td>
                            </tr>
                            <tr class="buildOrgItem kanchaTrBox hide">
                                <td class="th8">是否绿色建筑</td>
                                <td colspan="2">
                                    <select name="greenBuildingFlag" id="greenBuildingFlag" class="formData">
                                        <option value=""></option>
                                    </select>
                                </td>
                                <td class="th8">绿色建筑星级</td>
                                <td colspan="2">
                                    <select name="greenBuildingLevel" id="greenBuildingLevel" class="formData">
                                        <option value=""></option>
                                    </select>
                                </td>
                            </tr>
                            <tr class="buildOrgItem renfangBox hide">
                                <td class="th8 required">人防工程等级</td>
                                <td colspan="2">
                                    <input name="prjRfLevel" type="text" class="layui-input formData"
                                           placeholder="人防工程等级">
                                </td>
                                <td class="th8 required">战时用途</td>
                                <td colspan="2">
                                    <input name="wartimePurpose" type="text" class="layui-input formData"
                                           placeholder="战时用途">
                                </td>
                            </tr>
                            <tr class="buildOrgItem renfangBox hide">
                                <td class="th8 required">人防工程面积(㎡)</td>
                                <td colspan="2">
                                    <input name="prjRfArea" type="text" class="layui-input formData"
                                           placeholder="人防工程面积(㎡)">
                                </td>
                                <td class="th8 required">平时用途</td>
                                <td colspan="2">
                                    <input name="peacetimePurpose" type="text" class="layui-input formData"
                                           placeholder="平时用途(㎡)">
                                </td>
                            </tr>
                            <tr>
                                <td class="th8 required">工程描述</td>
                                <td colspan="5">
                                    <textarea name="prjDesc" id="prjDesc" cols="30" rows="10" lay-verify="isEmpty"
                                              class="formData" style="width:100%;"></textarea>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <!--单体列表-->
            <div class="layui-colla-item buildOrgItem hide">
                <h2 class="layui-colla-title">单体列表</h2>
                <div class="layui-colla-content layui-show">
                    <table id="dataList" class="layui-table layui-form" lay-filter="dataList"></table>
                    <script type="text/html" id="toolbarOrg">
                        <div class="layui-btn-container">
                            <button class="layui-btn layui-btn-xs" lay-event="addSingleProject">新增单体</button>
                        </div>
                    </script>
                    <script type="text/html" id="barDemo">
                        <a class="layui-btn layui-btn-xs" lay-event="change">修改</a>
                        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
                    </script>
                </div>
            </div>
            <!--勘察单位信息-->
            <div class="layui-colla-item kanchaBox hide">
                <h2 class="layui-colla-title">勘察单位信息</h2>
                <div class="layui-colla-content layui-show">
                    <table class="layui-table v-table">
                        <tbody>
                        <tr class="hide">
                            <td width="24%"></td>
                            <td width="13%"></td>
                            <td width="13%"></td>
                            <td width="24%"></td>
                            <td width="13%"></td>
                            <td width="13%"></td>
                        </tr>
                        <!--勘察单位信息-->
                        <tr>
                            <td class="th8 required">勘察单位名称</td>
                            <td colspan="5">
                                <input class="layui-input formData selectBtn selectName" data-type="kancha" type="text"
                                       placeholder="请选择" readonly
                                       name="kcCorpName" lay-verify="isEmpty">
                                <input type="hidden" name="kcCorpId" data-type="id" class="formData selectId">
                            </td>
                        </tr>
                        <tr class="kanchaInforTrBox hide">
                            <td class="th8 required">勘察单位项目负责人</td>
                            <td colspan="2">
                                <input type="text" class="layui-input selectPeopleBtn selectName formData"
                                       data-type="kancha"
                                       placeholder="请选择" name="kcProjectLeaderName" lay-verify="isEmpty"
                                       id="kcProjectLeaderName">
                                <input type="hidden" class="selectId formData" name="kcProjectLeaderId"
                                       id="kcProjectLeaderId">
                                <!--<select name="kcProjectLeaderName" class="formData" id="" >
                                    <option value="">请选择</option>
                                    <option value=""></option>
                                </select>-->
                            </td>
                            <td class="th8 required">联系电话</td>
                            <td colspan="2">
                                <input class="layui-input formData" type="text"
                                       name="kcCorpLinkPhone">
                            </td>
                        </tr>
                        <tr class="kanchaInforTrBox hide">
                            <td class="th8 required">项目负责人注册执业资格</td>
                            <td colspan="2">
                                <select name="kcLeaderRegisterQualification" id="kcLeaderRegisterQualification"
                                        lay-filter="LeaderRegisterQualification" class="formData">
                                    <option value="">请选择</option>
                                </select>
                            </td>
                            <td class="th8 required">项目负责人证书申报编号</td>
                            <td colspan="2">
                                <input class="layui-input formData leaderCerNum" type="text" name="kcLeaderCerNum"
                                       id="kcLeaderCerNum">
                            </td>
                        </tr>
                        <tr class="kanchaInforTrBox hide">
                            <td class="th8 required">勘察单位资质等级</td>
                            <td colspan="2">
                                <select name="kcCorpQualificationLevel" id="kcCorpQualificationLevel" class="formData">
                                    <option value="">请选择</option>
                                </select>
                            </td>
                            <td class="th8 required">勘察单位资质证书编号</td>
                            <td colspan="2">
                                <input class="layui-input formData" name="kcCorpQualificationCertificaeNum"
                                       id="kcCorpQualificationCertificaeNum" type="text">
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <!--设计单位信息-->
            <div class="layui-colla-item shejiBox hide">
                <h2 class="layui-colla-title">设计单位信息</h2>
                <div class="layui-colla-content layui-show">
                    <table class="layui-table v-table">
                        <tbody>
                        <tr class="hide">
                            <td width="24%"></td>
                            <td width="13%"></td>
                            <td width="13%"></td>
                            <td width="24%"></td>
                            <td width="13%"></td>
                            <td width="13%"></td>
                        </tr>
                        <!--勘察单位信息-->
                        <tr>
                            <td class="th8 required">设计单位名称</td>
                            <td colspan="5">
                                <input class="layui-input formData selectBtn selectName" data-type="sheji" type="text"
                                       placeholder="请选择" readonly
                                       name="sjCorpName" lay-verify="isEmpty">
                                <input type="hidden" name="sjCorpId" data-type="id" class="formData selectId">
                            </td>
                        </tr>
                        <tr class="shejiInforTrBox hide">
                            <td class="th8 required">设计单位项目负责人</td>
                            <td colspan="2">
                                <input type="text" placeholder="请选择" name="sjProjectLeaderName" id="sjProjectLeaderName"
                                       data-type="sheji" class="layui-input selectPeopleBtn selectName formData">
                                <input type="hidden" name="sjProjectLeaderId" id="sjProjectLeaderId"
                                       class="selectId formData">
                            </td>
                            <td class="th8 required">联系电话</td>
                            <td colspan="2">
                                <input class="layui-input formData" type="text"
                                       name="kcCorpLinkPhone">
                            </td>
                        </tr>
                        <tr class="shejiInforTrBox hide">
                            <td class="th8 required">项目负责人注册执业资格</td>
                            <td colspan="2">
                                <select name="sjLeaderRegisterQualification" id="sjLeaderRegisterQualification"
                                        lay-filter="leaderRegisterQualification" class="formData">
                                    <option value="">请选择</option>
                                </select>
                            </td>
                            <td class="th8 required">项目负责人证书申报编号</td>
                            <td colspan="2">
                                <input class="layui-input formData  leaderCerNum" type="text" name="sjLeaderCerNum"
                                       id="sjLeaderCerNum">
                            </td>
                        </tr>
                        <tr class="shejiInforTrBox hide">
                            <td class="th8 required">设计单位资质等级</td>
                            <td colspan="2">
                                <select name="sjCorpQualificationLevel" id="sjCorpQualificationLevel"
                                        lay-filter="sjCorpQualificationLevel" class="formData">
                                    <option value="">请选择</option>
                                    <option value=""></option>
                                </select>
                            </td>
                            <td class="th8 required">设计单位资质证书编号</td>
                            <td colspan="2">
                                <input class="layui-input formData" name="sjCorpQualificationCertificaeNum"
                                       id="sjCorpQualificationCertificaeNum" type="text">
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <!--专项工程信息-->
            <div class="layui-colla-item zhuanxiangBox buildOrgItem hide">
                <h2 class="layui-colla-title">专项工程信息</h2>
                <div class="layui-colla-content layui-show">
                    <table class="layui-table v-table">
                        <tbody>
                        <tr class="hide">
                            <td width="24%"></td>
                            <td width="13%"></td>
                            <td width="13%"></td>
                            <td width="24%"></td>
                            <td width="13%"></td>
                            <td width="13%"></td>
                        </tr>
                        <tr>
                            <td class="th8 required" colspan="2">专项名称</td>
                            <td colspan="2">计算单位</td>
                            <td colspan="2">计量</td>
                        </tr>
                        <tr>
                            <td class="th8 required" colspan="2">住宅或公寓室内精装修</td>
                            <td colspan="2">平方米</td>
                            <td colspan="2">
                                <input type="text" class="layui-input formData" name="residenceIndoorRenovateArea">
                            </td>
                        </tr>
                        <tr>
                            <td class="th8 required" colspan="2">公共建筑室内精装修</td>
                            <td colspan="2">平方米</td>
                            <td colspan="2">
                                <input type="text" class="layui-input formData" name="publicBuildingIndoorRenovateArea">
                            </td>
                        </tr>
                        <tr>
                            <td class="th8 required" colspan="2">建筑幕墙</td>
                            <td colspan="2">平方米</td>
                            <td colspan="2">
                                <input type="text" class="layui-input formData" name="buildingCurtainArea">
                            </td>
                        </tr>
                        <tr>
                            <td class="th8 required" colspan="2">轻型钢结构</td>
                            <td colspan="2">平方米</td>
                            <td colspan="2">
                                <input type="text" class="layui-input formData" name="lightSteelStructureArea">
                            </td>
                        </tr>
                        <tr>
                            <td class="th8 required" colspan="2">维修改造及景观照明工程</td>
                            <td colspan="2">平方米</td>
                            <td colspan="2">
                                <input type="text" class="layui-input formData" name="reformSceneryLightingArea">
                            </td>
                        </tr>
                        <tr>
                            <td class="th8 required" colspan="2">支护工程</td>
                            <td colspan="2">个</td>
                            <td colspan="2">
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <!--工程消防信息-->
            <div class="layui-colla-item xiangfangEng hide">
                <h2 class="layui-colla-title">工程消防信息</h2>
                <div class="layui-colla-content layui-show">
                    <table class="layui-table v-table">
                        <tbody>
                        <tr class="hide">
                            <td width="24%"></td>
                            <td width="13%"></td>
                            <td width="13%"></td>
                            <td width="24%"></td>
                            <td width="13%"></td>
                            <td width="13%"></td>
                        </tr>
                        <tr>
                            <td class="th8 required ">本工程属于</td>
                            <td colspan="5" id="prjXfBelong">
                                <!-- <input type="radio" name="prjXfBelong" value="消防设计审核" title="消防设计审核" checked>
                                 <input type="radio" name="prjXfBelong" value="消防设计备案" title="消防设计备案" >-->
                            </td>
                        </tr>
                        <tr class="chuangsuo hide">
                            <td class="th8 required ">大型人员密集场所</td>
                            <td colspan="5" id="prjXfDensePlace">
                                <!--<input type="checkbox" name="" lay-filter="" title="多选...."
                                       value="1">-->
                            </td>
                        </tr>
                        <tr class="gongcheng hide">
                            <td class="th8 required">其他特殊工程</td>
                            <td colspan="5" id="prjXfOtherSpecial">
                                <!--<input type="checkbox" name="" lay-filter="" title="多选...."
                                       value="1">-->
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

        <button lay-submit lay-filter="submit" style="display: none;" id="submit" class="demo1">提交</button>
    </form>
</div>
<script src="/static/js/main.js"></script>
<script type="text/javascript">
    var window = '';
    layui.use(['jquery', 'element', 'form', 'table', 'configure', 'configureCom', 'jsDictFileStatic', 'selectFun', 'bluebird', 'matchDict'], function () {
        var element = layui.element;
        var form = layui.form;
        var configure = layui.configure;
        var configureCom = layui.configureCom;
        var table = layui.table;
        var jsDictFileStatic = layui.jsDictFileStatic;
        var selectFun = layui.selectFun;
        var sessionFun = layui.sessionFun;
        var matchDict = layui.matchDict;
        window.$ = layui.jquery;
        var listData = {};
        //建设单位下的申报表单
        $('.buildOrgItem').remove();
        $('.kanchaInforTrBox').remove();
        $('.shejiInforTrBox').remove();
        //监管机构类型
        if (sessionFun.get(configure.SESSION_PROJECT_WAIT_LIST_DATA)) {
            listData = sessionFun.get(configure.SESSION_PROJECT_WAIT_LIST_DATA);
            $('.stage').html(listData.taskDefName);
            configureCom.checkboxDataFun(configure.SUBMIT_EXAM_INFO, listData.submitExamInfo, 'submitExamInfo'); //报审内容
            configureCom.checkboxDataFun(configure.UNION_RECORD_INFO, listData.unionRecordInfo, 'unionRecordInfo'); //联合备案内容
            configureCom.radioDataFun(configure.PRJ_XF_BELONG, listData.prjXfBelong, 'prjXfBelong'); //消防工程属于
            configureCom.radioDataFuns(configure.PRJ_XF_DENSE_PLACE, listData.prjXfDensePlace, 'prjXfDensePlace'); //大型人员密集场所
            configureCom.radioDataFunsl(configure.PRJ_XF_OTHER_SPECIAL, listData.prjXfOtherSpecial, 'prjXfOtherSpecial'); //其他特殊工程
            baoshenTypeFun(listData.submitExamInfo.split(','), listData);//报审情况各种操作
            if (listData.kcLeaderRegisterQualification) {
                getZizhiCert(listData.kcProjectLeaderId, listData.kcLeaderRegisterQualification, '#kcLeaderRegisterQualification');//勘察负责人注册职业资格
            }
            if (listData.sjLeaderRegisterQualification) {
                getZizhiCert(listData.sjProjectLeaderId, listData.sjLeaderRegisterQualification, '#sjLeaderRegisterQualification');//设计负责人注册职业资格
            }
            var unionRecordInfoArr = [];
            if (listData.unionRecordInfo) {
                unionRecordInfoArr = listData.unionRecordInfo.split(',')
            }
            //单体初始化
            prjCategoryFun(listData.prjCategory, unionRecordInfoArr);
        } else {
            listData = sessionFun.get(configure.SESSION_PROJECT_LIST_DATA);
            configureCom.checkboxDataFun(configure.SUBMIT_EXAM_INFO, '', 'submitExamInfo'); //报审内容
            configureCom.checkboxDataFun(configure.UNION_RECORD_INFO, '', 'unionRecordInfo'); //联合备案内容
            configureCom.radioDataFun(configure.PRJ_XF_BELONG, '', 'prjXfBelong'); //消防工程属于
            configureCom.radioDataFuns(configure.PRJ_XF_DENSE_PLACE, '', 'prjXfDensePlace'); //大型人员密集场所
            configureCom.radioDataFunsl(configure.PRJ_XF_OTHER_SPECIAL, '', 'prjXfOtherSpecial'); //其他特殊工程
            baoshenTypeFun([], listData);
        }
        form.val('example', listData);
        //所有表单不可填
        $('input,select,textarea').attr({'disabled': 'disabled'}).addClass('layui-disabled');
        form.val('example', listData);

        //报审内容选择
        form.on('checkbox(submitExamInfo)', function (data) {
            var baoshenArr = [];
            var checkBox = $(data.elem).parent().find('[type="checkbox"]:checked');
            $(checkBox).each(function (index, item) {
                baoshenArr.push($(item).val());
            });
            baoshenTypeFun(baoshenArr);
        });


        //切换报审内容时判断
        function baoshenTypeFun(arr, listData) {
            //是否已完成勘察报告审查
            if (arr.indexOf('1') > -1) {//包含勘察
                if (arr.indexOf('2') > -1) {//包含设计时
                } else if (arr.indexOf('3') > -1) {//包含专项时
                }
                $('.kanchaBox').removeClass('hide');//勘察单位盒子信息显示，名称显示
                $('.kanchaInforTrBox').removeClass('hide');//勘察单位信息详细显示
                configureCom.selectCustomDataFun(jsDictFileStatic.KC_REPORT_FLAG_KC, listData && listData.kcReportFlag, '#kcReportFlag');//只要有勘察时，是否已完成勘察报告审查字段
            } else if (arr.indexOf('1') == -1) {//不包含勘察
                $('.kanchaBox').addClass('hide');//勘察单位信息隐藏
                if (arr.indexOf('2') > -1) {
                    configureCom.selectCustomDataFun(jsDictFileStatic.KC_REPORT_FLAG_SJ, listData && listData.kcReportFlag, '#kcReportFlag');//只有设计时，是否已完成勘察报告审查字段
                } else if (arr.indexOf('3') > -1) {
                    configureCom.selectCustomDataFun(jsDictFileStatic.KC_REPORT_FLAG_ZX, listData && listData.kcReportFlag, '#kcReportFlag');//只有设计时，是否已完成勘察报告审查字段
                }
            } else {//任何都不包含时
                configureCom.selectDataFun(configure.KC_REPORT_FLAG, listData && listData.kcReportFlag, '#kcReportFlag'); //是否已完成勘察报告审查
            }
            //判断遴选情况
            if (arr.indexOf('2') > -1) {//包含设计
                $('[name="submitExamInfo"]').eq(2).attr('disabled', 'disabled');
                $('.shejiBox').removeClass('hide');//设计单位盒子信息显示，名称显示
                $('.shejiInforTrBox').removeClass('hide');//设计单位信息详细显示
                configureCom.selectCustomDataFun(jsDictFileStatic.SELECT_INFO_SJ, listData && listData.selectInfo, '#selectInfo');//只要有设计时，遴选情况
            } else if (arr.indexOf('2') == -1) {//不含设计
                $('[name="submitExamInfo"]').eq(2).removeAttr('disabled', 'disabled');
                $('.shejiBox').addClass('hide');//设计单位信息隐藏
                if (arr.indexOf('1') > -1 && arr.indexOf('3') > -1) {//如果含勘察含配套专项
                    configureCom.selectCustomDataFun(jsDictFileStatic.SELECT_INFO_KCZX, listData && listData.selectInfo, '#selectInfo');//含勘察含配套专项，遴选情况
                } else if (arr.indexOf('3') > -1) {//如果只有配套专项
                    configureCom.selectCustomDataFun(jsDictFileStatic.SELECT_INFO_ZX, listData && listData.selectInfo, '#selectInfo');//只含配套专项，遴选情况
                } else if (arr.indexOf('1') > -1) {//如果只有勘察
                    configureCom.selectCustomDataFun(jsDictFileStatic.SELECT_INFO_KC, listData && listData.selectInfo, '#selectInfo');//只含勘察，遴选情况
                }
            } else {//任何都不包含时
                configureCom.selectDataFun(configure.SELECT_INFO, listData && listData.selectInfo, '#selectInfo');//遴选情况
            }
            if (arr.indexOf('3') > -1) {//包含配套专项设计文件
                $('[name="submitExamInfo"]').eq(1).attr('disabled', 'disabled');
                $('.zhuanxiangBox').removeClass('hide');
            } else {//不包含配套专项设计文件
                $('[name="submitExamInfo"]').eq(1).removeAttr('disabled', 'disabled');
                $('.zhuanxiangBox').addClass('hide');
            }
            form.render('checkbox');
            //为修改详情
            try {
                unionRecordInfoFun(listData.unionRecordInfo.split(','));
            } catch (err) {
            }
        }

        //是否已完成勘察报告审查切换
        form.on('select(kcReportFlag)', function (data) {
            var value = data.value;
            kcReportFlagFun(value);//是否已完成勘察报告审查切换后续方法
        });


        //是否已完成勘察报告审查切换后续方法
        function kcReportFlagFun(relateKc) {
            if (relateKc == 2 || relateKc == 3) {//已完成勘察审查/ 勘查文件有修改需要重新审查
                $('.relateKc').removeClass('hide');
            } else {//未进行和有修改，不显示
                $('.relateKc').addClass('hide');
            }
        }

        //监听遴选
        form.on('select(selectInfo)', function (data) {
            var value = data.value;
            selectInfoFun(value);//监听遴选后续方法
        });

        //监听遴选后续方法
        function selectInfoFun(selectInfo) {
            if (selectInfo == 1) {//正常遴选，不显示
                $('.disShentuOrgBox').addClass('hide');
                $('.oldShentuOrgBox').addClass('hide');
            } else if (selectInfo == 2 || selectInfo == 3 || selectInfo == 4) {//后续、配套、专项工程，显示免于遴选关联项目和审查机构
                $('.disShentuOrgBox').removeClass('hide');
                $('.oldShentuOrgBox').addClass('hide');
            } else if (selectInfo == 5) {//重大修改，显示元审查机构
                $('.disShentuOrgBox').addClass('hide');
                $('.oldShentuOrgBox').removeClass('hide');
            }
        }

        var unionRecordArr = [];//联合备案数组
        //监听联合备案内容
        form.on('checkbox(unionRecordInfo)', function (data) {
            var checkBox = $(data.elem).parent().find('[type="checkbox"]:checked');
            unionRecordArr = [];
            $(checkBox).each(function (index, item) {
                unionRecordArr.push($(item).val());
            });
            unionRecordInfoFun(unionRecordArr);//监听联合备案后续方法
            prjCategoryFun(listData.prjCategory, unionRecordArr);
        });

        //监听联合备案内容后续方法
        function unionRecordInfoFun(arr) {
            if (arr.indexOf('2') > -1) {//含消防设计
                $('.xiangfangEng').removeClass('hide');
            } else if (arr.indexOf('2') == -1) {
                $('.xiangfangEng').addClass('hide');
            }
            if (arr.indexOf('1') > -1) {//含人防设计
                $('.renfangBox').removeClass('hide');
            } else {
                $('.renfangBox').addClass('hide');
            }
        }
        //监听工程属于
        form.on('radio(prjXfBelong)', function (data) {
            var engineering = [];
            var radioBox = $(data.elem).parent().find('[type="radio"]:checked');
            $(radioBox).each(function (index, item) {
                engineering.push($(item).val());
            });
            engineeringBelongsFun(engineering)
        });

        //监听工程属于显示方法
        function engineeringBelongsFun(arr) {
            if (arr.indexOf('1') > -1) {//消防设计审核
                $('.chuangsuo').removeClass('hide');
                $('.gongcheng').removeClass('hide');
            } else if (arr.indexOf('1') == -1) {
                $('.chuangsuo').addClass('hide');
                $('.gongcheng').addClass('hide');
            }
            if (arr.indexOf('2') > -1) {//消防设计备案
                $('.chuangsuo').addClass('hide');
                $('.gongcheng').addClass('hide');
            }
        }

        //监听主管部门(住建)
        form.on('select(regulatorZjLevel)', function (data) {
            var value = data.value;
            var nextAll = {prjId: listData.prjId, orgType: 5, orgLevel: value};
            configureCom.postDataAjax(configure.UNIT_SYS_ORG_DEC_ORG_HTTP, nextAll).then(function (res) {
                $('#regulatorZjDeptName').val(res.org.orgName);
                $('#regulatorZjDeptId').val(res.org.orgNo);
            });
        });
        //监听主管部门(人防)
        form.on('select(regulatorRfLevel)', function (data) {
            var value = data.value;
            var nextAll = {prjId: listData.prjId, orgType: 8, orgLevel: value};
            configureCom.postDataAjax(configure.UNIT_SYS_ORG_DEC_ORG_HTTP, nextAll).then(function (res) {
                $('#regulatorRfDeptName').val(res.org.orgName);
                $('#regulatorRfDeptId').val(res.org.orgNo);
            });
        });

        //工程性质切换方法      工程类别是否房建；是否包含消防
        function prjCategoryFun(prjCategory, unionRecordInfoArr) {
            //判断是否包含消防
            var xiaofangType = false;
            if (unionRecordInfoArr.indexOf('2') > -1) {//含消防设计
                xiaofangType = true;
            }
            //如果是房建
            var cols = [];
            if (prjCategory == configure.PRJ_TYPE_FJ_CODE) {
                $('.kanchaTrBox').removeClass('hide');
                cols = [[ //标题栏
                    {field: 'singlePrjName', title: '单体名称', rowspan: 2},
                    {
                        field: 'prjCategory', title: '工程类型', rowspan: 2, templet: function (d) {
                            return '<p>' + matchDict.name(d.prjCategory, configure.PRJ_CATEGORY) + '</p>';
                        }
                    },
                    {align: 'center', title: '层数', colspan: 2},
                    {
                        field: 'singleBuildingArea', title: '建筑面积(m)', rowspan: 2, templet: function (d) {
                            return '<p>' + d.singleBuildingArea + '</p><p>高度或埋深(m):' + d.heightOrDepth + '</p>'
                        }
                    },
                    {
                        field: 'structureType', title: '结构类型', rowspan: 2, templet: function (d) {
                            return '<p>' + matchDict.name(d.structureType, configure.PRJ_STUCTURE_TYPE) + '</p><p>基础形式:' + matchDict.name(d.foundationForm, configure.FOUNDATION_FORM) + '</p>';
                        }
                    },
                    {
                        field: 'fireResistantLevel', title: '耐火等级', rowspan: 2, width: 60, templet: function (d) {
                            return '<p>' + matchDict.name(d.fireResistantLevel, configure.FIRE_RESISTANT_LEVEL) + '</p>';
                        }
                    }
                ], [
                    {field: 'landLayer', title: '上层'},
                    {field: 'undergroundLayer', title: '下层'}
                ]];
                var childCols = [];
                if (xiaofangType) {
                    childCols = [
                        {
                            field: 'antiFirePartCount', title: '防火分区数量', rowspan: 2, templet: function (d) {
                                return '<p>' + d.antiFirePartCount + '</p><p>防火分区最大面积:' + d.antiFirePartMaxArea + '</p>';
                            }
                        },
                        {
                            field: 'antiSmokePartCount', title: '防烟分区数量', rowspan: 2, templet: function (d) {
                                return '<p>' + d.antiSmokePartCount + '</p><p>防烟分区最大面积:' + d.antiSmokePartMaxArea + '</p>';
                            }
                        },
                        {field: 'fireHazardClassification', title: '火灾危险分类', rowspan: 2},
                        {title: '操作', rowspan: 2, toolbar: '#barDemo', width: 150}
                    ];
                } else {
                    childCols = [
                        {title: '操作', rowspan: 2, toolbar: '#barDemo', width: 150}
                    ];
                }
                cols[0].push.apply(cols[0], childCols);
            } else {//如果是市政
                $('.kanchaTrBox').addClass('hide');
                cols = [[ //标题栏
                    {field: 'singlePrjName', title: '单体名称'},
                    {field: 'singleScale', title: '规模'},
                    {field: 'singleLength', title: '长度'},
                    {align: 'center', title: '操作', rowspan: 2, toolbar: '#barDemo', width: 150}
                ]];
            }
            projectSingleFun(cols);
        }

        function projectSingleFun(cols) {
            configureCom.tableRender(configure.PROJECT_SINGLE_LIST_HTTP, {decId: listData.decId}, cols, 'dataList', 10, 'full-500', 'toolbarOrg');
        }

        //头工具栏事件
        table.on('toolbar(dataList)', function (obj) {
            event.preventDefault();
            sessionFun.remove(configure.SESSION_SINGLE_PROJECT_DATA);
            switch (obj.event) {
                case 'addSingleProject':
                    editSingleProject('添加单体', configure.PROJECT_SINGLE_SAVE_HTTP);
                    break;
            }
        });
        //行工具栏事件
        table.on('tool(dataList)', function (obj) {
            event.preventDefault();
            var data = obj.data;
            sessionFun.set(configure.SESSION_SINGLE_PROJECT_DATA, data);
            switch (obj.event) {
                case 'change':
                    editSingleProject('修改单体', configure.PROJECT_SINGLE_UPDATE_HTTP);
                    break;
                case 'delete':
                    deleteSingleProject(data.singleId);
                    break;
            }
        });

        //单体编辑
        function editSingleProject(title, editHttp) {
            var detailUrl = '';
            if (listData.prjCategory == configure.PRJ_TYPE_FJ_CODE) {
                if (unionRecordArr.indexOf('2') > -1) {
                    detailUrl = configure.FJ_PROJECT_SINGLE_DETAIL_HTML + '?type=xf';
                } else {
                    detailUrl = configure.FJ_PROJECT_SINGLE_DETAIL_HTML;
                }
            } else {
                detailUrl = configure.SJ_PROJECT_SINGLE_DETAIL_HTML;
            }
            top.layer.open({
                type: 2,
                title: title,
                content: detailUrl,
                area: configureCom.Psize1,
                btn: ['保存', '取消'],
                btnAlign: 'c',
                yes: function (index, layero) {
                    var iframeWin = top.window.frames['layui-layer-iframe' + index]; //得到iframe页的窗口对
                    iframeWin.getData().then(function (res) {
                        console.log(res.result);
                        var singleData = res.result;
                        singleData.decId = listData.decId;
                        singleData.prjId = listData.prjId;
                        configureCom.postDataAjax(editHttp, singleData).then(function (res) {
                            top.layer.msg('保存成功！');
                            top.layer.close(index);
                            configureCom.tableReload(true);//刷新页面
                        });
                    });
                }
            });
        }

        //单体删除
        function deleteSingleProject(singleId) {
            top.layer.alert('是否删除当前单体?', function (index, layero) {
                configureCom.postDataAjax(configure.PROJECT_SINGLE_DELETE_HTTP, {singleId: singleId}).then(function (res) {
                    top.layer.close(index);
                    configureCom.tableReload(true);//刷新页面
                });
            });
        }

        configureCom.selectDataFun(configure.REGULATOR_DEPT_LEVEL, listData.regulatorZjLevel, '#regulatorZjLevel');//建设主管部门
        configureCom.selectDataFun(configure.REGULATOR_DEPT_LEVEL, listData.regulatorRfLevel, '#regulatorRfLevel');//人防主管部门
        configureCom.selectDataFun(configure.PRJ_CATEGORY, listData.prjCategory, '#prjCategory');//工程项目类别
        configureCom.selectDataFun(configure.PRJ_PROPERTY, listData.prjQuality, '#prjQuality');//工程性质
        configureCom.selectDataFun(configure.PRJ_FUNCTION, listData.prjPurpose, '#prjPurpose');//工程用途
        configureCom.selectDataFun(configure.PRJ_SCALE, listData.prjScale, '#prjScale');//项目建设规模
        configureCom.selectDataFun(configure.PRJ_APPROVAL_SOURCE, listData.prjApprovalSource, '#prjApprovalSource');//立项来源
        configureCom.selectDataFun(configure.ANTI_SEISMIC_FORTIFICATION_PROOF_FLAG, listData.antiSeismicFortificationProofFlag, '#antiSeismicFortificationProofFlag');//抗震设防专项论证
        configureCom.selectDataFun(configure.FORTIFICATION_INTENSITY, listData.fortificationIntensity, '#fortificationIntensity');//设防烈度(度)
        configureCom.selectDataFun(configure.PRJ_LEVE, listData.prjKcLevel, '#prjKcLevel');//工程勘察等级
        configureCom.selectDataFun(configure.IS_NOT, listData.buildingEnergyDesignFlag, '#buildingEnergyDesignFlag');//含建筑节能设计
        configureCom.selectDataFun(configure.IS_NOT, listData.overHignFlag, '#overHignFlag');//超限高层
        configureCom.selectDataFun(configure.IS_NOT, listData.greenBuildingFlag, '#greenBuildingFlag');//是否绿色建筑
        configureCom.selectDataFun(configure.GREEN_BUILDING_LEVEL, listData.greenBuildingLevel, '#greenBuildingLevel');//绿色建筑星级

        //原勘察审查机构
        $('#form').on('click', '.selectKcOrgBtn', function () {
            var $this = $(this);
            var colsData = [[
                {type: 'radio'},
                {field: 'prjCode', title: '项目编号'},
                {field: 'prjName', title: '项目名称'},
                {field: 'checkOrgName', title: '设计审查机构'},
                {field: 'kcCheckOrgName', title: '勘察审查机构'}
            ]];
            var unitUrl = configure.OLD_KC_SHENTU_PROJECT_LIST_HTTP + '?prjId=' + listData.prjId;
            configureCom.childViewSelectFun('选择项目', colsData, unitUrl).then(function (res) {
                if (res.length > 0) {
                    var childData = res[0];
                    // form.val(,childData);
                    var $thisName = childData.checkOrgName + '(' + childData.prjName + ')';//审查机构+项目名
                    $this.val($thisName);
                    $this.siblings('[data-type="id"]').val(childData.checkOrgId);
                    $('#kcReportFinishTime').val(childData.kcReportFinishTime);//勘察完成时间
                    $('#kcReportQualifyBookNum').val(childData.kcReportQualifyBookNum);//勘察合格书编号
                }
            });
        });
        //免于遴选时关联项目和审查机构
        $('#form').on('click', '.selectShenTuProjBtn', function () {
            var $this = $(this);
            var colsData = [[
                {type: 'radio'},
                {field: 'prjCode', title: '项目编号'},
                {field: 'prjName', title: '项目名称'},
                {field: 'checkOrgName', title: '设计审查机构'},
                {field: 'kcCheckOrgName', title: '勘察审查机构'}
            ]];
            var unitUrl = configure.SHENTU_PROJECT_LIST_HTTP + '?prjId=' + listData.prjId;
            configureCom.childViewSelectFun('选择项目', colsData, unitUrl).then(function (res) {
                if (res.length > 0) {
                    var childData = res[0];
                    // form.val(,childData);
                    var $thisName = childData.checkOrgName + '(' + childData.prjName + ')';//审查机构+项目名
                    $this.val($thisName);
                    $this.siblings('[data-type="id"]').val(childData.checkOrgId);
                    $('#kcReportFinishTime').val(childData.kcReportFinishTime);//勘察完成时间
                    $('#kcReportQualifyBookNum').val(childData.kcReportQualifyBookNum);//勘察合格书编号
                }
            });
        });

        //选择勘察设计企业
        $('#form').on('click', '.selectBtn', function () {
            var $this = $(this);
            var colsData = [[
                {type: 'radio'},
                {field: 'creditCode', title: '组织机构代码'},
                {field: 'orgName', title: '单位名称'},
                {field: 'orgTypeName', title: '企业类型'},
                {field: 'createTime', title: '添加时间'},
                {field: 'statusName', title: '状态'}
            ]];
            var $thisType = $this.attr('data-type');
            var unitUrl = '';
            switch ($thisType) {
                case 'kancha':
                    unitUrl = configure.SURVERY_COMPANY_LIST_HTTP;
                    break;
                case 'sheji':
                    unitUrl = configure.SHEJI_COMPANY_LIST_HTTP;
                    break;
            }
            configureCom.childViewSelectFun('选择单位', colsData, unitUrl).then(function (res) {
                if (res.length > 0) {
                    var childData = res[0];
                    $this.val(childData.orgName);
                    $this.siblings('.selectId').val(childData.orgNo);
                }
            });
        });
        //选择勘察设计项目负责人
        $('#form').on('click', '.selectPeopleBtn', function () {
            var $this = $(this);
            var $thisType = $this.attr('data-type');
            var colsData = [[
                {type: 'radio'},
                {field: 'realName', title: '人员姓名'}
            ]];
            var typeFilter = '';
            switch ($thisType) {
                case 'kancha':
                    typeFilter = '#kcLeaderRegisterQualification';
                    break;
                case 'sheji':
                    typeFilter = '#sjLeaderRegisterQualification';
                    break;
            }
            configureCom.childViewSelectFun('选择人员', colsData, configure.COM_ZIZHI_USER_ONJOB_LIST_HTTP).then(function (res) {
                if (res.length > 0) {
                    var childData = res[0];
                    $this.val(childData.realName);
                    $this.siblings('.selectId').val(childData.userId);
                    getZizhiCert(childData.userId, '', typeFilter);
                }
            });
        });

        //获取项目负责人注册执业资格
        function getZizhiCert(userId, targetVal, typeFilter) {
            configureCom.postDataAjax(configure.USER_ZIZHI_CERT_ALL_LIST_HTTP, {userId: userId}).then(function (res) {
                var zizhiList = res.page.records;
                configureCom.selectCustomDataFun(zizhiList, targetVal, typeFilter, 'aptitudeName', 'aptitudeName', 'aptitudeNumber');
            });
        }

        //选择职业资格显示证书编号
        form.on('select(leaderRegisterQualification)', function (data) {
            var type = $(data.elem).find('option:selected').attr('data-type');//证书编码
            $(data.elem).closest('tr').find('.leaderCerNum').val(type);
        });

        var defaults = {
            s1: 'provinceNum',
            s2: 'cityNum',
            s3: 'countyNum',
            v1: 450000,
            v2: listData.cityNum,
            v3: listData.countyNum
        };
        selectFun.treeSelect(defaults);
        // $('.attachmentList').attr('src', configureCom.nocache(configure.ATTA_LIST_HTML + '?checkType=2&type=' + type));
        form.render();
        element.render('collapse');

        form.on('submit(submit)', function (data) {
            return false;
        });
    });

    function getData() {
        return new Promise(function (res, rej) {
            var data = {};
            if (!window.formVerifyFun()) {
                return false;
            }
            $('.formData').each(function (index, item) {
                if (!($(item).closest('tr').hasClass('hide'))) {
                    var key = '';
                    if ($(item).attr('type') == 'checkbox') {
                        key = $(item).attr('name');
                        var value = '';
                        $('[name="' + key + '"]:checked').each(function (index, item) {
                            if (!index) {
                                value = $(item).val();
                            } else {
                                value += ',' + $(item).val();
                            }
                        });
                        data[key] = value;
                    } else if ($(item).attr('type') == 'radio') {
                        key = $(item).attr('name');
                        var value = '';
                        $('[name="' + key + '"]:checked').each(function (index, item) {
                            if (!index) {
                                value = $(item).val();
                            } else {
                                value += ',' + $(item).val();
                            }
                        });
                        data[key] = value;
                    } else {
                        key = $(item).attr('name');
                        data[key] = $(item).val();
                    }
                }
            });
            res({result: data});
        });
    }

</script>
</body>
</html>
